﻿<!DOCTYPE HTML>
<html lang="zh">
<head>
<title>IsObject - 语法 &amp; 使用 | AutoHotkey v2</title>
<meta name="description" content="The IsObject function returns a non-zero number if the specified value is an object." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>IsObject</h1>

<p>如果指定的值是对象, 则返回非零数字.</p>

<pre class="Syntax">IsObject := <span class="func">IsObject</span>(ObjectValue)</pre>
<h2 id="Parameters">参数</h2>
<dl>

  <dt>ObjectValue</dt>
  <dd>
    <p>类型: <a href="../Concepts.htm#objects">对象</a></p>
    <p>存储在变量中的, 函数返回的, 存储在另一个对象中的或直接写入的<a href="../Objects.htm">对象</a>.</p>
  </dd>

</dl>

<h2 id="Return_Value">返回值</h2>
<p>类型: <a href="../Concepts.htm#boolean">整数(布尔值)</a></p>
<p>如果指定的值是一个对象, 函数返回 1(true), 如果不是, 返回 0(false).</p>

<h2 id="Related">相关</h2>
<p><a href="../Objects.htm">Objects</a></p>
<h2 id="Examples">示例</h2>
<div class="ex" id="ExBasic">
<p><a class="ex_number" href="#ExBasic"></a> 报告 "This is an object." 因为值是对象.</p>
<pre>obj := {key: "value"}

if IsObject(obj)
    MsgBox "This is an object."
else
    MsgBox "This is not an object."</pre>
</div>

</body>
</html>